Skip to main content

Sugar Light Sensor

Detects ambient light intensity and returns analog data.

The light sensor module is often mistaken for an LED module. The Sugar light sensor uses a high-precision transparent encapsulated photosensitive element. Please pay attention to distinguish between them.
![image.png](方糖 光敏.assets/1623392914733-56d16daa-1663-4db5-95ff-1be849bc3634.png)

Parameters


Size24 x 24 x 16 mm
Weight4.7 g
SignalAnalog Input
Range0~3.3V Corresponds to Micro:bit 0~1023

Wiring


Connect the light sensor module to P1 on the Robotbit Edu using a 3-pin terminal cable.

(Only P0, P1, and P2 pins can be connected, as they have analog read functionality.)

After turning on the Robotbit power, you will see the red light at the bottom of the light sensor module illuminate (indicating the module is powered normally).
![image.png](方糖 光敏.assets/1634634641388-2a145151-86b0-42fb-8c05-6242f66e26e5.png)

Programming

#Micro:bit Matrix Display Shows Light Sensor Feedback Value

image.png

#Light Sensor Alarm System

When the light sensor is completely covered by hand, the matrix displays a crying face, otherwise it displays a smiling face.
image.png